
export default {
	// base_url: 'http://localhost:8000/api/web/',
	base_url: '/api/web/',
	// base_url: 'http://192.168.1.8:8000/api/web/',
	// base_url: 'http://qupai.yyclub.me:800/api/web/',
	
	post(url, data = {}) {
		return this._http(url, 'POST', data);
	},
	get(url) {
		return this._http(url, 'GET', {});
	},
	_http(url, method, data = null) {
		return new Promise((resolve, reject) => {
			return uni.request({
				url: this.base_url  + url,
				method: method,
				data: data,
				timeout: 100000,
				success: (res) => {
					resolve(res.data)
				},
				fail: (res) => {
					reject(res)
				}
			})
		})
	}
}
